package org.example.service.impl;

import org.example.entity.Patient;
import org.example.mapper.PatientMapper;
import org.example.model.DataModel;
import org.example.service.PatientService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author pang
 * @create 2021--07--06--14:40
 * 实现接口方法的快捷键：alt+enter
 * 注入spring容器的方式：
 * 1、@Resource
 * 2、采用setter方法注入
 * public void setPatientMapper(PatientMapper patientMapper) {
 *         this.patientMapper = patientMapper;
 *     }
 * 3、构造方法注入容器（官方推荐）
 */
@Service
public class PatientServiceImpl implements PatientService {
    //    @Resource
    private final PatientMapper patientMapper;

    public PatientServiceImpl(PatientMapper patientMapper) {
        this.patientMapper = patientMapper;
    }

    @Override
    public List<Patient> getAllPatient() {
        return patientMapper.getAllPatient();
    }

    @Override
    public List<DataModel> getMapData() {
        return patientMapper.getMapData();
    }

    @Override
    public int getConfirmedNum() {
        return patientMapper.getConfirmedNum();
    }

    @Override
    public int getRegisteredNum() {
        return patientMapper.getRegisteredNum();
    }

    @Override
    public int getSymptomaticNum() {
        return patientMapper.getSymptomaticNum();
    }

    @Override
    public int getAsymptomaticNum() {
        return patientMapper.getAsymptomaticNum();
    }

    @Override
    public int getSuspectedNum() {
        return patientMapper.getSuspectedNum();
    }

    @Override
    public int getCureNum() {
        return patientMapper.getCureNum();
    }

    @Override
    public int getSeriousNum() {
        return patientMapper.getSeriousNum();
    }

    @Override
    public int getDeathNum() {
        return patientMapper.getDeathNum();
    }

    @Override
    public int getConfirmedNumadd() {
        return patientMapper.getConfirmedNumadd();
    }

    @Override
    public int getRegisteredNumadd() {
        return patientMapper.getRegisteredNumadd();
    }

    @Override
    public int getSymptomaticNumadd() {
        return patientMapper.getSymptomaticNumadd();
    }

    @Override
    public int getAsymptomaticNumadd() {
        return patientMapper.getAsymptomaticNumadd();
    }

    @Override
    public int getSuspectedNumadd() {
        return patientMapper.getSuspectedNumadd();
    }

    @Override
    public int getCureNumadd() {
        return patientMapper.getCureNumadd();
    }

    @Override
    public int getSeriousNumadd() {
        return patientMapper.getSeriousNumadd();
    }

    @Override
    public int getDeathNumadd() {
        return patientMapper.getDeathNumadd();
    }
}
